import HTTP from "@/http";
import { LoginApi,LogOutApi,ImgCodeApi,WxQrcodeApi } from "./type";
const $h = new HTTP({timeout:5000,baseURL:import.meta.env.VITE_API_URL})

export const loginApi = (params:LoginApi.RequestParams)=>{
    return $h.post<LoginApi.ResponseData>(LoginApi.URL,params)
}
export const logOutApi = ()=>{
    return $h.post<LogOutApi.ResponseData>(LogOutApi.URL)
}
export const getImgCodeApi = ()=>{
    return $h.get<ImgCodeApi.ResponseData>(ImgCodeApi.URL)
}
export const getWxQrcodeApi = ()=>{
    return $h.get<WxQrcodeApi.ResponseData>(WxQrcodeApi.URL)
}